<%--
  $Id: listInclude.jsp 46 2013-05-03 21:38:12Z gabakyan $
  $Author: gabakyan $
  $Revision: 46 $
  $Date: 2013-05-03 21:38:12 +0000 (Fri, 03 May 2013) $

  Copyright (c) 2013 Supply Chain Intelligence (SCI), Inc.
  http://www.scintelligence.com/, Email: info@scintelligence.com
  All rights reserved.

  This file is part of Logistics Map.

  Logistics Map is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, version 3 of the License.

  Logistics Map is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with Logistics Map.  If not, see <http://www.gnu.org/licenses/>.
--%>
            <table class="table table-striped">
                <thead>
                    <tr>
                        <%--<th></th>--%>
                        <th><fmt:message key="includes.admin.user.log.listInclude.label.username"/></th>
                        <th><fmt:message key="includes.admin.user.log.listInclude.label.firstName"/></th>
                        <th><fmt:message key="includes.admin.user.log.listInclude.label.lastName"/></th>
                        <th><fmt:message key="includes.admin.user.log.listInclude.label.type"/></th>
                        <th><fmt:message key="includes.admin.user.log.listInclude.label.session"/></th>
                        <th><fmt:message key="includes.admin.user.log.listInclude.label.creationDate"/></th>
                    </tr>
                </thead>
                <tbody>
                    <%--<c:set var="first" value="${userLogPage.size * userLogPage.number}"/>--%>
                    <c:forEach items="${userLogPage.content}" var="userLog" varStatus="status">
                    <tr class="${status.count % 2 == 0 ? 'even' : 'odd'}">
                        <%--<td>${first + status.count}</td>--%>
                        <td>${userLog.user.username}</td>
                        <td>${userLog.user.firstName}</td>
                        <td>${userLog.user.lastName}</td>
                        <td>
                            <%--${userLog.type}--%>
                            <c:if test="${not empty userLog.type}">
                                <fmt:message key="${userLogTypeToMessageCodes[userLog.type]}"/>
                            </c:if>
                        </td>
                        <td>${userLog.sessionId}</td>
                        <td><fmt:formatDate pattern="${LONG_DATE_TIME_PATTERN}" value="${userLog.creationDate}" /></td>
                    </tr>
                    </c:forEach>
                </tbody>
            </table>

            <myutil:pagination page="${userLogPage.number}" pageSize="${userLogPage.number}" totalPages="${userLogPage.totalPages}" total="${userLogPage.total}" baseUrl="/admin/user/log"/>

